<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<title></title>
	<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
	<div id="app">
		<h1>点击次数：{{count}}</h1>
		<!-- 可以使用表达式完成事件操作 -->
		<button type="button" @click="count+=1">点击</button>
		<br>
		<!-- 获取事件对象 -->
		<button type="button" @click="clickEvent">点击</button>
	</div>

	<script type="text/javascript">
		var app = new Vue({
			el: "#app",
			data: {
				count: 0
			},
			methods: {
				clickEvent: function (event) {
					// console.log(event);
					// console.log(this);
					this.count++;
				}
			}
		})
	</script>
</body>

</html>